package com.summer.service.impl;

import com.github.pagehelper.PageInfo;
import com.summer.entity.OrderBorrow;
import com.summer.mapper.OrderBorrowMapper;
import com.summer.service.IOrderBorrowService;
import com.summer.vo.BorrowUserVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Desc:
 * Created by tl on 2018/12/20
 */
@Service
public class OrderBorrowService implements IOrderBorrowService {

    @Resource
    private OrderBorrowMapper orderBorrowMapper;

    @Override
    public void updateSelective(OrderBorrow orderBorrow) {
        orderBorrowMapper.updateByPrimaryKeySelective(orderBorrow);
    }

    @Override
    public PageInfo<BorrowUserVO> queryWithUser(Map<String, Object> params) {
        List<BorrowUserVO> list = orderBorrowMapper.findParams(params);
        return new PageInfo<>(list);
    }
}
